*2000 and 2004 Convention Delegate Survey Studies*
*Factor Analysis of Elite Issue Attitudes*
*Wed. 21 December 2011*
*Updated: Tues. 24 January 2012*
*Updated: Tues. 13 November 2012*
*Updated: Wed. 14 November 2012*
*Updated: Thurs. 15 November 2012*
*Updated: Friday 16 November 2012*
*Updated: Tues. 4 December 2012*
*Updated: Tues. 4 December 2012*
*Updated: Thurs. 6 December 2012*
*Updated: Friday 7 December 2012*
*Updated: Sat. 8 December 2012*
*Updated: Thurs. 13 December 2012*
*Updated: Friday 14 December 2012*
*Updated: Mon. 7 January 2013*
*Updated: Mon. 28 January 2013*
*Updated: Wed. 27 March 2013*
*Updated: Mon. 5 August 2013*
*Updated: Tues. 8 October 2013*
*Updated: Wed. 12 March 2014*

****************
*2000 Data*
*Thank you, Geoff Layman!*
****************

****************
*Recode symbolic predisposition variable*
****************

*Ideological self-identification*

gen Ideology00 = v2087
drop if Ideology00 == . 
label var Ideology00 "Ideological Self-identification"
label define Ideologicalidentification00 /// 
1 "1 Extremely Liberal" 7 "7 Extremely conservative"
label values Ideology00 Ideologicalidentification00

****************
*Recode issue attitude variables*

*Note: The twelve issues included in the analysis for 2000 are the following:* 
*services spending, welfare spending, spending on programs to assist the* 
*unemployed, government versus private health insurance, child care spending,* 
*public school spending, assistance to blacks, spending on the environment,* 
*defense spending, abortion, homosexual feeling thermometer and government* 
*efforts to protect homosexuals from job discrimination*

*Note: The services spending, defense spending, abortion and feeling* 
*thermometer of homosexuals issue attitude variables are reverse coded* 
*so higher values reflect more conservative attitudes*
****************

*Services spending*
*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*

gen Services00 = v2143
replace Services00 = . if v2143 == 9
replace Services00 = 1 if v2143 == 7
replace Services00 = 2 if v2143 == 6
replace Services00 = 3 if v2143 == 5
replace Services00 = 5 if v2143 == 3
replace Services00 = 6 if v2143 == 2
replace Services00 = 7 if v2143 == 1
label var Services00 "Government Provision of Services versus Lower Spending"
label define Servicesgov00 /// 
1 "1 Government provide more services" 7 "7 Government provide fewer services"
label values Services00 Servicesgov00

*Welfare spending*

gen Welfare00 = v2441
replace Welfare00 = . if v2441 == 9 
label var Welfare00 "Attitudes Toward Welfare Spending"
label define Welfarespending00 /// 
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Welfare00 Welfarespending00

*Government versus private health insurance*

gen Insurance00 = v2152
replace Insurance00 = . if v2152 == 9
label var Insurance00 /// 
"Attitudes Toward Government versus Private Insurance Plans"
label define Insuranceplan00 /// 
1 "1 Government insurance plan" 7 "7 Private insurance plan"
label values Insurance00 Insuranceplan00

*Child care spending*

gen Childcare00 = v2440
replace Childcare00 = . if v2440 == 9
label var Childcare00 "Attitudes Toward Spending on Child Care"
label define Childcarespending00 ///
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Childcare00 Childcarespending00

*Public school spending*

gen Schools00 = v2438
replace Schools00 = . if v2438 == 9
label var Schools00 "Attitudes Toward Spending on Public Schools"
label define Schoolspending00 ///
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Schools00 Schoolspending00

*Spending on the environment*

gen Environ00 = v2442
replace Environ00 = . if v2442 == 9
label var Environ00 "Attitudes on Spending to Protect the Environment"
label define Environmentspending00 ///
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Environ00 Environmentspending00

*Defense spending*
*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*

gen Defense00 = v2121
replace Defense00 = . if v2121 == 9
replace Defense00 = 1 if v2121 == 7
replace Defense00 = 2 if v2121 == 6
replace Defense00 = 3 if v2121 == 5
replace Defense00 = 5 if v2121 == 3
replace Defense00 = 6 if v2121 == 2
replace Defense00 = 7 if v2121 == 1
label var Defense00 "Attitudes on Defense Spending"
label define Defensespending00 /// 
1 "1 Greatly decrease defense spending" 7 "7 Greatly increase defense spending"
label values Defense00 Defensespending00

*Government assistance to blacks*

gen Assistblacks00 = v2122
replace Assistblacks00 = . if v2122 == 9
label var Assistblacks00 "Attitudes Toward Government Assistance of Blacks"
label define Assistanceblacks00 /// 
1 "1 Government help blacks" 7 "7 Blacks help themselves" 

*Abortion*
*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*

gen Abortion00 = v2106
replace Abortion00 = . if v2106 == 9
replace Abortion00 = 1 if v2106 == 4
replace Abortion00 = 2 if v2106 == 3
replace Abortion00 = 3 if v2106 == 2
replace Abortion00 = 4 if v2106 == 1
label var Abortion00 "Attitudes on Abortion"
label define Abortionattitudes00 /// 
1 "1 By law, a woman should always be able to obtain an abortion as a matter of personal choice" /// 
2 "2 The law should permit abortion for reasons other than rape, incest, or danger to the woman's life, but only after the need for the abortion has been clearly established" ///
3 "3 The law should permit abortion only in case of rape, incest or when the woman's life is in danger" /// 
4 "4 By law, abortion should never be permitted"
label values Abortion00 Abortionattitudes00

*Feeling thermometer of homosexuals*

*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*

*Although recoding feeling thermometer variables is rare, the step is taken* 
*here in order to ensure that all variables in the analysis are coded in the* 
*same direction, thus avoiding potentially confusing negative factor loadings*

gen Homosexualstherm00 = v2186
replace Homosexualstherm00 = . if v2186 == 999
label var Homosexualstherm00 "Feeling Thermometer of Homosexuals"
label define Homosexualsthermometerm00 /// 
0 "0 Cold" 100 "100 Warm"
label var Homosexualstherm00 Homosexualsthermometer00
 
gen Rhomosexualstherm00 = 100 - Homosexualstherm00
label var Rhomosexualstherm00 "Feeling Thermometer of Homosexuals"
label define Rhomosexualsthermometerm00 /// 
0 "0 Warm" 100 "100 Cold"
label values Rhomosexualstherm00 Rhomosexualsthermometerm00

*Government efforts to protect homosexuals from job discrimination*

gen Jobdiscrimination00 = v2415
label var Jobdiscrimination00 /// 
"Attitudes Toward Government Efforts to Protect Homosexuals from Job Discrimination"
label define Jobdiscriminationgays00 /// 
1 "1 Special effort" 7 "No special effort"
label values Jobdiscrimination00 Jobdiscriminationgays00

****************
*Exploratory factor analysis of the 2000 elite issue attitudes*

*Note: This procedure is conducted to determine the appropriate "indicator*
*variable" for factors 1 and 2 (social welfare and cultural) in the* 
*confirmatory factor analysis*
****************

factor Services00 Welfare00 Insurance00 Schools00 Childcare00 /// 
Environ00 Defense00 Assistblacks00 Abortion00 Rhomosexualstherm00 ///
Jobdiscrimination00, ipf

*Note: The analysis indicates that attitudes toward government services and* 
*feeling thermometer of homosexuals are appropriate "indicator variables"* 
*for factor 1 and factor 2, respectively*

****************
*Create a scree plot of the factor analysis results*
*Note: This step is taken almost entirely in the interest of nostalgia!*
****************

screeplot, msymbol(Oh) mcolor(black) ylab(,angle(0)) aspect(1)

****************
*Obtain squared multiple correlation coefficients of each variable with all* 
*other variables*
****************

estat smc

****************
*Confirmatory factor analysis of the 2000 elite issue attitudes*

*Note: Attitudes toward services spending and feeling thermometer* 
*of homosexuals are *appropriate "indicator variables" for factors 1 and 2* 
*(social welfare and cultural), respectively*
****************

sem (L1 -> Welfare00) (L1 -> Services00) ///
(L1 -> Insurance00) (L1 -> Childcare00) (L1 -> Schools00) /// 
(L1 -> Assistblacks00) (L1 -> Environ00) (L1 -> Defense00) ///
(L2 -> Rhomosexualstherm00) (L2 -> Jobdiscrimination00) /// 
(L2 -> Abortion00), /// 
covstruct (_lexogenous, diagonal) standard latent (L1 L2) nocapslatent  ///
cov (L1*L2)

****************
*Examine fit statistics for the confirmatory factor analysis*
****************

estat gof, stats(all)

****************
*Correlate ideological self-identifications with factor one, which is* 
*hypothesized to represent ideology*

*Note: This procedure also reports a ninety-five percent confidence* 
*interval for the estimated correlation*
****************

predict Factor100, latent(L1)

net search corrci

corrci Ideology00 Factor100

****************
*2004 Data*
*Thank you, Geoff Layman!*
****************

****************
*Recode symbolic predisposition variable*
****************

*Ideological self-identification*

gen Ideology04 = q13a
label var Ideology04 "Ideological Self-identification"
label define Ideologicalidentification04 /// 
1 "1 Extremely Liberal" 2 "2 Liberal" 3 "3 Somewhat liberal" 4 "4 Moderate" /// 
5 "5 Somewhat conservative" 6 "6 Conservative" 7 "7 Extremely conservative"
label values Ideology04 Ideologicalidentification04

****************
*Recode issue attitude variables*

*Note: The twelve issues included in the analysis for 2000 are the following:* 
*services spending, welfare spending, spending on programs to assist the* 
*unemployed, government versus private health insurance, child care spending,* 
*public school spending, assistance to blacks, spending on the environment,* 
*defense spending, abortion, feeling thermometer of homosexuals and same sex*
*marriage*

*Note: The services, defense spending, feeling thermometer of homosexuals* 
*and same-sex marriage issue attitude variables are reverse coded so higher* 
*values reflect more conservative attitudes*
****************

*Services spending*
*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*

gen Services04 = q17a
replace Services04 = 1 if q17a == 7
replace Services04 = 2 if q17a == 6
replace Services04 = 3 if q17a == 5
replace Services04 = 5 if q17a == 3
replace Services04 = 6 if q17a == 2
replace Services04 = 7 if q17a == 1
label var Services04 "Government Provision of Services versus Lower Spending"
label define Servicesgov04 /// 
1 "1 Government provide many more services, increase spending a lot" /// 
7 "7 Government provide many fewer services, reduce spending a lot"
label values Services04 Servicesgov04

*Welfare spending*

gen Welfare04 = q22d
label var Welfare04 ///
"Attitudes Toward Welfare Spending"
label define Welfarespending04 ///
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Welfare04 Welfarespending04

*Government health insurance*

gen Insurance04 = q20
label var Insurance04 /// 
"Attitudes Toward Government versus Private Insurance Plans"
label define Insuranceplan04 /// 
1 "1 Government insurance plan" 7 "7 Private insurance plan"
label values Insurance04 Insuranceplan04

*Child care spending*

gen Childcare04 = q22c
label var Childcare04 "Attitudes Toward Spending on Child Care"
label define Childcarespending04 ///
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Childcare04 Childcarespending04

*Public school spending*

gen Schools04 = q22a
label var Schools04 "Attitudes Toward Spending on Public Schools"
label define Schoolspending04 ///
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Schools04 Schoolspending04

*Government assistance to blacks*

gen Assistblacks04 = q19
label var Assistblacks04 "Attitudes Toward Government Assistance of Blacks"
label define Assistanceblacks04 /// 
1 "1 Government should help blacks" 7 "7 Blacks should help themselves" 

*Spending on the environment*

gen Environ04 = q22e
label var Environ04 "Attitudes Toward Spending on the Environment"
label define Environment04 ///
1 "1 Increase a lot" 2 "2 Increase slightly" 3 "3 Keep at the same level" /// 
4 "4 Decrease slightly" 5 "5 Decrease a lot"
label values Environ04 Environment04

*Defense spending*
*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*

gen Defense04 = q18
replace Defense04 = 1 if q18 == 7
replace Defense04 = 2 if q18 == 6
replace Defense04 = 3 if q18 == 5
replace Defense04 = 5 if q18 == 3
replace Defense04 = 6 if q18 == 2
replace Defense04 = 7 if q18 == 1
label var Defense04 "Attitudes on Defense Spending"
label define Defensespending04 /// 
1 "1 Greatly decrease defense spending" /// 
7 "7 Greatly increase defense spending"
label values Defense04 Defensespending04

*Abortion*

gen Abortion04 = q14a
label var Abortion04 "Attitudes on Abortion"
label define Abortionattitudes04 /// 
1 "1 By law, a woman should always be able to obtain an abortion as a matter of personal choice" /// 
2 "2 The law should permit abortion for reasons other than rape, incest, or danger to the woman's life, but only after the need for the abortion has been clearly established" /// 
3 "3 The law should permit abortion only in case of rape, incest or when the woman's life is in danger" /// 
4 "4 By law, abortion should never be permitted"
label values Abortion04 Abortionattitudes04

*Feeling thermometer of homosexuals*
*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*
*Although recoding feeling thermometer variables is rare, the step is taken* 
*here in order to ensure that all variables in the analysis are coded in the* 
*same direction, thus avoiding potentially confusing negative factor loadings*

gen Homosexualstherm04 = q25d
label var Homosexualstherm04 "Feeling Thermometer of Homosexuals"
label define Homosexualsthermometerm04 /// 
0 "0 Cold" 104 "104 Warm"
label var Homosexualstherm04 Homosexualsthermometer04
 
gen Rhomosexualstherm04 = 100 - Homosexualstherm04
label var Rhomosexualstherm04 "Feeling Thermometer of Homosexuals"
label define Rhomosexualsthermometerm04 /// 
0 "0 Warm" 104 "104 Cold"
label values Rhomosexualstherm04 Rhomosexualsthermometerm04

*Same-sex marriage*
*Note: This variable is reverse coded so higher values reflect more* 
*conservative attitudes*

gen Marriage04 = q15
replace Marriage04 = 1 if q15 == 3
replace Marriage04 = 3 if q15 == 1
label var Marriage04 "Attitudes Toward Same-sex Marriage"
label define Marriageviews04 /// 
1 "1 The law should define marriage as a union between two people regardless of their gender" ///
2 "2 The law should define marriage as a union between one man and one woman, but recognize legal agreements between same-sex couples" ///3 "3 The law should define marriage only as a union between one man and one woman"
label values Marriage04 Marriageviews04

****************
*Exploratory factor analysis of the 2004 elite issue attitudes*
*Note: This procedure is conducted to determine the appropriate "indicator*
*variable" for factors 1 and 2 (social welfare and cultural) in the* 
*confirmatory factor analysis*
****************

factor Services04 Welfare04 Insurance04 Childcare04 Schools04 ///
Assistblacks04 Environ04 Defense04 Abortion04 Rhomosexualstherm04 /// 
Marriage04, ipf

*Note: The analysis indicates that attitudes toward government versus private*
*insurance and same sex marriage are appropriate "indicator variables"*
*for factor 1 and factor 2, respectively*

****************
*Create a scree plot of the factor analysis results*
*Note: This step is taken almost entirely in the interest of nostalgia!*
****************

screeplot, msymbol(Oh) mcolor(black) ylab(,angle(0)) aspect(1)

****************
*Obtain squared multiple correlation coefficients of each variable with all* 
*other variables*
****************

estat smc

****************
*Confirmatory factor analysis of the 2004 elite issue attitudes*
*Note: Attitudes toward services spending and abortion are appropriate* 
*"indicator variables" for factors 1 and 2 (social welfare and cultural),* 
*respectively*
****************

sem (L1 -> Services04) (L1 -> Welfare04) (L1 -> Insurance04) ///
(L1 -> Childcare04) (L1 -> Schools04) (L1-> Assistblacks04) /// 
(L1 -> Environ04) (L1 -> Defense04) (L2 -> Abortion04) ///
(L2 -> Rhomosexualstherm04) (L2 -> Marriage04), standard latent (L1 L2) /// 
nocapslatent cov (L1*L2)

****************
*Examine fit statistics for the confirmatory factor analysis*
****************

estat gof, stats(all)

****************
*Correlate ideological self-identifications with factor one, which* 
*is hypothesized to represent ideology*
*Note: This procedure also reports a ninety-five percent confidence* 
*interval for the estimated correlation*
****************

predict Factor104, latent(L1)

corrci Ideology04 Factor104
